libtool: Fix mishandling compiler flags with MSVC tools
With MSVC, linker flags were not properly being linked in during a
compile command. A check has been added to verify if there are linker
flags set and then use a different command when linking.
Fixes applied for bug#74175.
* build-aux/ltmain.in: Fix command parser for '-Wl' option for MSVC.
* m4/libtool.m4: Fix MSVC compile commands.
* tests/flags.at: Use '$GREP --' instead of '$FGREP' when comparing with
stdout.