mingw: avoid mktemp() in mkstemp() implementation