Make the library work on both the browser and nodejs.