Put config before require.js

As require.js API says: Also, you can define the config object as the
global variable require *before* require.js is loaded

As it is now, it looks for data-main before config has been applied, and
assumes ```(!cfg.baseUrl)``` erroneously (see require.js:~1910 for that)