AMD and ES6 interop support

Under modules=amd, mark modules with property '__esModule', and treat all other modules as default exports to allow mixing ES6 and AMD modules under both ES6 and AMD loaders.