Close dialog on click outside the dialog. Fixes #2.