Add (horrible) script to do simple conversion from generated declaration to ambient external declarations
Switch to version of when.d.ts that actually works