Added compile guards for allowing use with system versions as low as iOS 5.1.0.