Did you find the window and quotes in window['isNaN'] was actually needed? I would expect closure compiler to be aware of isNaN via the default externs and not mess with it.