fixed for testing in node and running non-modularly in browser