add polyfill for setImmediate