fix setImmediate for IE8 and other old browsers