Add AMD-loader support

This PR adds support for AMD-loaders such as require.js and curl.js