fix ios7 gesture support

This should fix broken pinch-to-zoom on ios7 due to gesture* events being moved from window to document.
Note that applied like this, it will (probably) still not work for custom targets.