core: fix link errors with ncurses library