Added indexOf polyfil for IE