fix for issue #6

fixed as per:
http://stackoverflow.com/questions/3629183/why-doesnt-indexof-work-on-an-array-ie8