Adds method to enable/disable library hooks.
Fixes phpunit runkit group, should have used @group runkit instead of @runkit.