Change touch device detection
The previous version doesn't work on iOS8 safari.