Compile for both node and browser