indexOf polyfill for IE