title: Issue loading rxjs bundle with SystemJs
body: <p><strong>Versions</strong></p>
  <p><code>npm: 3.10.9</code><br />
  <code>systemjs: 0.19.41</code><br />
  <code>typescript: 1.8.10</code><br />
  <code>rxjs: 5.0.3</code></p>
  <p><strong>Background</strong></p>
  <p>I have a project (that's written in typescript) that i'm trying to add <code>rxjs</code> to, but have come across an issue when loading the bundled file through <code>systemjs</code>.</p>
  <p><strong>SystemJs config</strong></p>
  <pre><code>System.config({
      transpiler: 'typescript',
      paths: {
          'src:*': '/src/*',
          'npm:*': '/node_modules/*'
      },
      map: {
          'lib': 'src:lib',
          'rxjs': 'npm:rxjs/bundles/Rx.js',
          'typescript': 'npm:typescript/lib/typescript.js',
          'systemjs': 'npm:systemjs/dist/system.src.js'
      },
      packages: {
          lib: {
              defaultExtension: 'js'
          }
      }
  });
  </code></pre>
  <p><strong>Problem</strong></p>
  <p>Using the above config, i get the following error.</p>
  <pre><code>Error: (SystemJS) undefined is not a constructor (evaluating '__extends(UnsubscriptionError, _super)')
  </code></pre>
  <p>Which is caused by the fact that systemjs incorrectly defaults to <code>amd</code> format and the <code>exporter</code> function on line 245 of <code>Rx.js</code> never gets executed.</p>
  <p>From the systemjs docs:</p>
  <blockquote>
  <p><strong>Module format detection</strong></p>
  <p>When the module format is not set, automatic regular-expression-based    detection is used. This module format detection is never completely accurate, but caters well for the majority use cases.</p>
  </blockquote>
  <p><strong>Attempted solution</strong></p>
  <p>I presumed that explicitly setting the <code>rxjs</code> package format to <code>global</code> in the config would fix this issue.</p>
  <pre><code>System.config({
      transpiler: 'typescript',
      paths: {
          'src:*': '/src/*',
          'npm:*': '/node_modules/*'
      },
      map: {
          'lib': 'src:lib',
          'rxjs': 'npm:rxjs/bundles/Rx.js',
          'typescript': 'npm:typescript/lib/typescript.js',
          'systemjs': 'npm:systemjs/dist/system.src.js'
      },
      packages: {
          lib: {
              defaultExtension: 'js'
          },
          rxjs: {
              format: 'global'
          }
      }
  });
  </code></pre>
  <p><strong>Problem 2</strong></p>
  <p>Although this fixed the first issue, it created a second. As everywhere that i attempt to use the <code>rxjs</code> imports now throws an error, as they're <code>undefined</code>.</p>
  <pre><code>import {Observable} from 'rxjs'
  
  export class SomeClass {
  
      ...
      
      private _isObservable(arg: any): boolean {
          return arg instanceof Observable;
      }
  }
  </code></pre>
  <p><code>Uncaught TypeError: Right-hand side of 'instanceof' is not an object at SomeClass._isObservable</code></p>
  <p>Debugging the transpiled code in the console reveals that although <code>window.Rx</code> gets correctly set to the <code>Rx</code> object, the <code>rxjs_1_1</code> object that gets set on <code>SomeClass</code>, is not the global <code>Rx</code> object, but instead another object with the <code>Rx</code> global set as a property 'Rx' on it.</p>
  <p>So <code>rxjs_1.Rx.Observable</code> works, but not of rxjs_1.Observable`.</p>
  <pre><code>(function(System, SystemJS) {System.register(['rxjs'], function(exports_1, context_1) {
  &quot;use strict&quot;;
  var __moduleName = context_1 &amp;&amp; context_1.id;
  var rxjs_1;
  var SomeClass;
  return {
      setters:[
          function (rxjs_1_1) {
              rxjs_1 = rxjs_1_1;
          }],
      execute: function() {
          SomeClass = (function () {
              function SomeClass() {
              }
              ...
              SomeClass.prototype._isObservable = function (arg) {
                  return arg instanceof rxjs_1.Observable;
              };
              return SomeClass;
          }());
          exports_1(&quot;SomeClass&quot;, SomeClass);
      }
  }
  </code></pre>
  <p>});</p>
  <p><strong>Question</strong></p>
  <p>Any idea how i get it to pass in <code>Rx</code> object instead?</p>