Improve CommonJS compatibility