Replaced WorkerPromise with browser's Promise implementation if available, and a proper SimplePromise otherwise.