Fixes #5324: Resolves race condition for 'elgg' AMD module

Moved the non-cacheable initialization *above* the js/elgg script so that we don't have to wait for a callback to define the AMD module.

Fiddled around with it on a test server and all seems well.