replace deprecated function __defineGetter__

__defineGetter__ is deprecated:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__

Replacing it with Object.defineProperty retains the same functionality.

This was causing a failure in IE.