make endOfMicrotask work on IE.