replaces use of indexOf with more idomatic CoffeeScript

Removes all use of `Array.prototype.indexOf` to support IE8