MinGW doesn't contain mkstemp(), fixing.

Handle this generically in case _any_ platform doesn't contain it.