iOS 7 deprecation related fixes
Merge remote-tracking branch 'upstream/master'
Merge pull request #2 from kohol/master

Synced with original repo.