Fixes IE7/8 where the indexOf polyfill was causing the browser to crash

cc @asmega @tobscher