Use our own buffer for tmpnam() if the platform seems to know about it. Avoids threading and reentrancy problems.