try_compile(): Include languages with _ or - when passing linker vars

Fixes: #25809
5 files changed