Enabling 'when.d.ts' to be also usable as an external module so that is can be included like 'import When = require(../when/when);'
Adjusting test after changing when.d.ts.

Note: In opposite to other Promise implementation such as" promise-es6" or"Q" the implementation "when.js" is AMD/CommonJS aware und therefore needs to be loaded as an module (e.g. using "requirejs").
Merge pull request #1853 from pkaul/master

Turn "when.d.ts" into an external module