CommonJS support

Added a simple CommonJS wrapper.