Use Object.defineProperty instead of __defineGetter__

__defineGetter__ is not standardized and not supported in IE. It thus breaks Travis completely in IE. This not only fixes https://github.com/travis-ci/travis-ci/issues/1001 but also ensures that the JavaScript code is standards-compliant.