Add BSD mktemp support