LLVM detects when ncurses has a separate terminfo library, but linking to it was broken in lldb since b6633957 (LLVM14) due to a change of variables. This commit fixes that oversight.