If some symbols are marked with dllexport, we still want to export
all symbols if -export-all-symbols is specified. Previously, this
only worked as it should for DLL output, not for EXE.
This should fix downstream bug
https://github.com/msys2/MINGW-packages/issues/9163.