Make dialogs cancelable.
This is necessary as sometimes goo.im hangs for a while and we cannot
close the dialogs.