snprintf fix for Win32 vs Linux