Fixing compiler warning in iOS 8 regarding deprecation