Fixes deprecation warnings with iOS SDK 6