Added indexof method for Array in case it is IE8 or below