make compatible with require.js