function runScript(code) {
    var parent,
        script,
        sibling,
        anchor = freeDefine ? define.amd : Benchmark,
        prop = uid + 'runScript',
        prefix = '(' + (freeDefine ? 'define.amd.' : 'Benchmark.') + prop + '||function(){})();';

    // Non-browser environments, Firefox 2.0.0.2 (executes asynchronously),
    // and IE < 9 will error here and that's OK.
    // Script injection is only used to avoid the previously commented JaegerMonkey bug.
    // We remove the inserted script *before* running the code to avoid differences
    // in the expected script element count/order of the document.
    try {
      sibling = document.getElementsByTagName('script')[0];
      parent = sibling.parentNode;
      script = document.createElement('script');
      anchor[prop] = function() { parent.removeChild(script); };
      script.appendChild(document.createTextNode(prefix + code));
      parent.insertBefore(script, sibling);
    } catch(e) { }

    delete anchor[prop];
  }
Runs a snippet of JavaScript via script injection.
@private
@param {String} code The code to run.