fixed rotation detection on ios5, fixed PortraitUpsideDown orientation