Issue#85 fix

http://hub.jmonkeyengine.org/forum/topic/proposed-fix-for-issue85-end-demo-app-when-window-is-closed/