mkstemp doesn't exist on Windows. A function is provided by LLVM support libraries for this reason, so use that instead.
Thanks Zachary. Please commit.
Closed by commit rL220218 (authored by @zturner).