Fixed touch event compatibility with jQuery.

Fixed touch emulation to work with Firefox.