setimmediate fallback for browsers