Fix require statements to run in a browser and vanilla Node.js setup.