fixed array prototype for in loop with hasOwnProperty