Properly handle orientation changes across iOS 7 and 8.
Merge pull request #336 from krzysztofzablocki/master

Properly handle orientation changes across iOS 7 and 8.