Add isBrowser and isWebWorker variables
Wrap browser specific code in if-else block
Implement web worker support.

1. Get `loaderDir` from `Error.stack`
2. Use `importScripts` to load script