iOS 7 deprecation related fixes
Merge remote-tracking branch 'upstream/master'