fix tmpnam to generate better names, not depend on non-ISO-C symbols