Update orientation events detection according to http://www.html5rocks.com/en/tutorials/device/orientation/