[sanitizer] Workaround broken mktemp on certain platforms.