Added require.js / AMD support