Fix indexOf() non-support in IE8