Fixes to play well with Google's JS compiler.