Fixed polylines for iOS

(1) Changed current_touches to use strings as keys

(2) Needed to implement a sort of manual version of indexOf
    because MobileSafari is stupid