Windows: Add guard for snprintf.

Also fixes the warning for unsigned char*.