Temporary workaround for making beginSheetModalForWindow block.