Fixed building for iOS6.x.

This would build for iOS7 but not for iOS6. Whenever I selected a target SDK of 6.1 the build would break here. This now uses conditionals to check if its building for iOS7+ to decide which API to use.