Add indexOf to Array prototype

Add support for browsers which don't implement the Array.indexOf method.