Fixed -no-undefined handling with mingw and cygwin
"-no-undefined" is not a linker flag, it's a libtool flag, so it must be
removed from LDFLAGS for CYGWIN and MINGW. There is already another variable
for that purpose.