Search for ncurses in libtinfo; fixes #7281