Use NSFoundationVersionNumber for iOS 8 detection

NSFoundationVersionNumber can be used to check the version of iOS, so when later versions of iOS 8 are released the detection will still work.