title: Running intern-runner with external library relying on window fails. ReferenceError: window is not defined
body: <p>I've been trying to make Intern work at the same time as another library called Pact, for contract testing. My dummy test looks like this:</p>
  
  <pre><code>define([
    'intern!object',
    'intern/chai!expect',
    'bower_components/pact-consumer-js-dsl/dist/pact-consumer-js-dsl.js'
  ], function(registerSuite, expect) {
    registerSuite({
      name: 'Test',
  
      'login form': function() {
        var _this = this;
  
        return this.remote
          .get(loginUrl)
          ...
          .end();
      }
    });
  });
  </code></pre>
  
  <p>The problem is that if I try to run the test including the Pact library (line 4), Intern shows an error because <code>window</code> is not defined.</p>
  
  <p><code>Warning: ReferenceError: window is not defined</code></p>
  
  <p>If I remove the inclusion of the library, the test runs correctly, opens the browser and it makes everything that it is supposed to do. I am running this already as <code>functionalSuite</code> and I am using <code>intern-runner</code> instead of client. I tried using Chrome or PhantomJS with no luck.</p>
  
  <p>It is not a problem just with the Pact library, it seems to happen every time that I try to use something else that also uses <code>window</code> or <code>document</code> (with jQuery for instance, it can't find <code>document</code>).</p>
  
  <p>My config for Intern looks like this:</p>
  
  <pre><code>define({
  
    proxyPort: 9999,
  
    proxyUrl: 'http://localhost:9999/',
  
    capabilities: {
      'selenium-version': '2.45.0'
    },
  
    environments: [
      { browserName: 'chrome' }
    ],
  
    tunnel: 'NullTunnel',
  
    maxConcurrency: 3,
  
    functionalSuites: ['test/intern/integration/login'],
  
    excludeInstrumentation: /^tests|bower_components|node_modules\//
  
  });
  </code></pre>
  
  <p>If somebody knows a solution for this I will be extremely grateful :)</p>