Link against libtinfo if present.