title: exports is not defined when running compiled typescript
body: <p>I am trying to take my first steps into working with typescript and I've run into an issue when trying to run my application.</p>
  
  <p>I get the error <code>ReferenceError: exports is not defined</code></p>
  
  <p>the code I have is quite simple:</p>
  
  <pre><code>// --src/changeset.ts
  export enum ChangeAction {
    ADD,
    DELETE,
    MODIFY
  }
  
  export class Changeset {
    constructor(
      public version: Number,
      public content: String,
      public path: String,
      public action: ChangeAction
    ) {}
  }
  
  // --src/index.ts
  import { Changeset, ChangeAction } from "./changeset";
  
  const set = new Changeset(0, "Hello world", "/dev/null", ChangeAction.ADD);
  set.version = 0;
  
  console.log("Hello World! " + set.version);
  
  // --tsconfig.json
  {
    "compilerOptions": {
      "target": "es5",
      "module": "commonjs",
      "outDir": "build"
    },
    "include": ["src/**/*"]
  }
  </code></pre>
  
  <p>running <code>tsc</code>, it compiles and seems to work without any real issues, however when I try to run it with <code>node build/index.js</code> it crashes with this</p>
  
  <pre><code>build/index.js:2
  Object.defineProperty(exports, "__esModule", { value: true });
                        ^
  
  ReferenceError: exports is not defined
  </code></pre>
  
  <p>It feels like I am missing something quite obvious, but I can't really seem to put my finger on it, so what am I missing?</p>