Index: bp-themes/bp-default/functions.php
===================================================================
--- bp-themes/bp-default/functions.php	(revision 6331)
+++ bp-themes/bp-default/functions.php	(working copy)
@@ -112,7 +112,7 @@
 		add_theme_support( 'custom-header', $custom_header_args );
 	}
 
-	if ( !is_admin() ) {
+	if ( !is_admin() || ( defined('DOING_AJAX') && DOING_AJAX ) ) {
 		// Register buttons for the relevant component templates
 		// Friends button
 		if ( bp_is_active( 'friends' ) )
