Fix image rotation on iOS devices