fixed Google Closure compiler, export functions to window global namespace.