Also generate a .dll in MinGW builds

Previously only static a static library was produced on MinGW builds,
this PR makes sure that we also build a proper .dll