Fixed polyline support in Internet Explorer

Hey, 

I just noticed that there's some methods I was relying on that don't work in IE. Not sure why at all, but this code should work for all browsers now.