Add global var for requirejs case

Modify localized.js to handle the case where some sites have require.js and the object is not being added globally.