Fix iOS 6 deprecation warnings