function pumpQueue() {
      if (!queue.length) {
        callback();
        return;
      }
      var script = document.createElement('script');
      script.src = queue[0];
      queue.splice(0, 1);
      script.onload = function() {
        pumpQueue();
      };
      var target = document.head || document.body || document.documentElement;
      target.appendChild(script);
    }
Pseudo-synchronously imports the given namespaces (and their
dependencies) and issues the callback when done.
@param {!Array.<string>} namespaces Namespaces to import (like 'my.app').
@param {!Function} callback Function call when loading completes.