Fix linker error for mingw environment