Update ionic.js

Test if touches event is defined to prevent Uncaught TypeError: Cannot read property 'length' of undefined