Fixes iOS `orientationchange` bug.
See http://stackoverflow.com/questions/12515058/ios6-safari-orientation-change-bug
for explanation.