Ios8

Since registerForRemoteNotificationTypes: has been deprecated in ios8, introduce macro to fit ios7 and ios8