.def files are handled differently on MinGW than MSVC for the WIN32 target:
```
[ 14%] Linking C shared library libexpat.dll
/usr/lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld: ../lib/libexpat.def:4: syntax error
/usr/lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld:../lib/libexpat.def: file format not recognized; treating as linker script
/usr/lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld:../lib/libexpat.def:1: syntax error
collect2: error: ld returned 1 exit status
```
\r
if(BUILD_shared)\r
set(_SHARED SHARED)\r
- if(WIN32)\r
+ if(MSVC)\r
set(expat_SRCS ${expat_SRCS} lib/libexpat.def)\r
- endif(WIN32)\r
+ endif(MSVC)\r
else(BUILD_shared)\r
set(_SHARED STATIC)\r
if(WIN32)\r