Fixed MinGW build (except linking, but who does that?)