configure: Detect msvcrt libc with a CPP check instead of a link check

Simplifies host/target libc detection splitting.