converted Object.defineProperty calls to use Object.defineProperties in order to make closure happy