Use goog.global instead of window

See f1f319d6ada50d13774e24b7492a812fb7a727ac
Merge pull request #1040 from fredj/goog_global

Use goog.global instead of window