Changed hasOwnProperty call to use Object.prototype to avoid IE8 bug. Fixes #49