Implement OSX hook patching