Fixed NSFoundationVersionNumber checking to allow compilation on Xcode 4

The constant `NSFoundationVersionNumber_iOS_6_1` is undefined in Xcode 4 (NSObjCRuntime.h).