Added amdefine for node.js compatibility