Fix hasOwnProperty bug for IE8