Fix crash on close of the Display when using Java 7 on OS X