fixed link problem: only define DLL_SPEC for shared library of mingw