The simple check for module assumes that a global module variable exists, which is not the case if the browser just has an global exports variable and not a global module variable