fix: added iOS8 compatibility

Hi!
On iOS8 [[UIApplication sharedApplication] enabledRemoteNotificationTypes] is deprecated. This fix check's verison of iOS, and uses adequate method.