add compatibility with require.js