Added prototype def of indexOf because it is not defined for ie<9.