Use defineProperties to extend Promise.

Fixes a “TypeError: Promise is not a promise” error in Chrome and
Firefox.
Merge pull request #9 from dgraham/fix-deferred-promise

Use defineProperties to extend Promise.