[vector-api] Fix linestring hit detection bug

This PR fixes the bug found while playing with the KML example.

https://github.com/openlayers/ol3/pull/1434 needs to be merged first.