Fixes #958. Declare onTouchStart as a function expression.

This way it gets hoisted properly and we don't rely on undefined
behavior (which doesn't work in some browsers).