Expose the when function when using amd.
Merge pull request #20 from ericmatthys/master

Expose the when function when using amd.