Expose the when function when using amd.

I don't think there is currently a way to get to when() if the library is being used with amd. Let me know if I'm mistaken.