nextTick implementation for the browser