Add emulated snprintf() for Windows