u_int8_t is missing on mingw

(cherry picked from commit ddda13ceb7db10c170a8993f7f7ee965d8520e34)