fixed endless loop in byte2bin for platforms with unsigned char