Fix URL module for browser and node