Specifically, this is what I ended up amend to:

    function l10nStartup() {
      gReadyState = 'interactive';

      var userLocale = navigator.language || navigator.userLanguage;

      consoleLog('loading [' + userLocale + '] resources, ' +
          (gAsyncResourceLoading ? 'asynchronously.' : 'synchronously.'));

      // load the default locale and translate the document if required
      if (document.documentElement.lang === userLocale) {
        loadLocale(userLocale);
      } else {
        loadLocale(userLocale, translateFragment);
      }
    }