More CommonJS compatability fixes