Patch for Safari's window.prompt behavior