added support for Array.prototype.indexOf