Native indexOf breaks internet explorer.

Replaced usage of native indexOf with it's underscore alternative, so that IE7 and IE8 work.