Add basic support for running in HTML5 WebWorker