Improved error handling in eglutRefreshNativeWindow, see issue #1.
Destroying the native window rather than calling exit(0);