function defineGetter(obj, name, getter) {
  Object.defineProperty(obj, name, {
    configurable: true,
    enumerable: true,
    get: getter
  });
}
Helper function for creating a getter on an object.

@param {Object} obj
@param {String} name
@param {Function} getter
@private