Hack to make progress dialog modal on all platforms.