add fallback code for JS implementations that lack Object.defineProperty, Object.getOwnPropertyDescriptor, or Object.prototype.hasOwnProperty