fix snprintf on windows