I think this should use `goog.global` instead of `window`. This will permit the parser to be used in environments where `window` is not defined, e.g. NodeJS and WebWorkers.