Convert AMD-style javascript modules to CommonJS, preserving comments and whitespace in the original code.