Fix compatibility for MinGW