Update: I split this into two files: the plugin header, the function my_plugin_init() and the add_action into an initthisplugin.php, and the rest into myPlugin.php
Now myPlugin.php gets loaded, since buddypress is active, but stills throws an Fatal error: Call to undefined function bp_is_active().