Feature detection instead of checking iOS version
Added both checks in to maintain compatibility with the iOS 7 SDK
Merge branch 'schjonhaug_pr'