Fixed OS X build when using cocoapods.

Embedded UIResponder code into `#if TARGET_OS_IPHONE` so that it builds without issues for OS X targets when using cocoapods.