Fix double quit dialog box on java 1.8 OS X.