Fixed JavaScript tests

- included shim for global variables otherwise delivered by server side rendering