fallback to setTimeout if setImmediate not available