Fixed IE incompatibility

Oops. I introduced this bug. I forgot IE doesn't have an `Array.prototype.indexOf` function, it only worked on my installation because I manually defined that function. Back to `String.prototype.indexOf` it is! It was silly of me for not copying exactly how you did it in your other places.