Fixed bug in main.cpp where ncurses would not be deallocated when exiting from an XnInterface init failure