preliminary CommonJS support, will not handle many cases