Always retain API objects after creation.

This appears to fix browser/page lockups after closing the plugin and
then using it again in the future.