Fix build on MinGW