convert AMD modules into a node.js compatible format