Add version checking where using iOS7 features.

This fixes issue #246