Environment agnostic nextTick polyfill