Adds iOS 5 compatibility.
Fixes output issue on iPad by adjusting for iPad's frame buffer.