Index: bp-loader.php
===================================================================
--- bp-loader.php	(revision 4021)
+++ bp-loader.php	(working copy)
@@ -35,6 +35,8 @@
 if ( !defined( 'BP_PLUGIN_URL' ) )
 	define( 'BP_PLUGIN_URL', plugins_url( $path = '/buddypress' ) );
 
+global $wpdb;
+
 // Define the user and usermeta table names, useful if you are using custom or shared tables.
 if ( !defined( 'CUSTOM_USER_TABLE' ) )
 	define( 'CUSTOM_USER_TABLE',      $wpdb->base_prefix . 'users' );
