portability fix (uint8_t in stdint.h)