MinGW now has _mktemp_s, use overload with size parameter

MSVC also used the custom implementation, since the function isn't a
macro and therefore

  #ifndef _mktemp_s

didn't work as intended.
diff --git a/src/test.cc b/src/test.cc
index 8ba2297..021005e 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #ifdef _WIN32
 #include <windows.h>
+#include <io.h>
 #else
 #include <unistd.h>
 #endif
@@ -45,19 +46,9 @@
 namespace {
 
 #ifdef _WIN32
-#ifndef _mktemp_s
-/// mingw has no mktemp.  Implement one with the same type as the one
-/// found in the Windows API.
-int _mktemp_s(char* templ) {
-  char* ofs = strchr(templ, 'X');
-  sprintf(ofs, "%d", rand() % 1000000);
-  return 0;
-}
-#endif
-
 /// Windows has no mkdtemp.  Implement it in terms of _mktemp_s.
 char* mkdtemp(char* name_template) {
-  int err = _mktemp_s(name_template);
+  int err = _mktemp_s(name_template, strlen(name_template) + 1);
   if (err < 0) {
     perror("_mktemp_s");
     return NULL;