Fix linking under mingw

Linker did not created correct dll library for windows platform.