Fix windows builds with MingGW