Do not define WorkerProxy as a top-level function

Rather, use window['WorkerProxy'] to assign it to the global scope.