Add support for Array.indexOf(element).