Update utils.js

offset aways return 0 in iOS, use this instead, tested with most browser