exit Hot Module Replacement script if not in Browser context

This solves the issue that if we start the server with `--inline --hot` option, and later the script get injected into `WebWorker` will throw exception.
I'd better to silently fail rather than throw exception.