Fix iOS 7 deprecations