Check for libtinfo after libncurses

See Gentoo bug 459768.


https://bugs.gentoo.org/show_bug.cgi?id=459768