Fixed emscripten_get_now in a shell

Calling `emscripten_get_now()` in a shell was throwing `ReferenceError: window is not defined` because window was accessed without checking.

I didn't test with spidermonkey, but Date.now() is at least available from the d8 shell.