Fix mktemp compatibility