Add hasOwnProperty when looping through arrays for IE8 support.