Fix finding and including ncurses
Fix compiler warnings