Candidate fix for building on MinGW