correct a screen-zoom issue on rotation in iOS - rewritten in CoffeeScript
// by @mathias, @cheeaun and @jdalton