Fix for iOS 8 & previous in Xcode 6 & previous

This fixes the issue of the registration not working in plugin version 2.3.1 for iOS 7 & previous. The fix checks the SDK version at compile time, and then uses the appropriate methods at runtime.