Better fix for snprintf non-termination on windows.