Added fix for missing 'hasOwnProperty' in IE8