Fix an issue in Firefox with hasOwnProperty

Firefox couldn’t detect malformed data property? So, using for in,
rather than hasOwnProperty.