Replace depreciated setters & getters with new API.

Replace depreciated __defineSetter__ and __defineGetter__ with
Object.defineProperty.