IE8 fix for hasOwnProperty on window