Fix build for MinGW