Fix undeclared variable error from closure compiler

See https://developers.google.com/closure/compiler/docs/limitations for context.