Added option to include CommonJS modules in embedded JavaScript functions