Fixed round_to_str function

When ndigits was undefined, the function failed and cut all the trailing zeros in the number. This was because the ndigits == 0 condition wasn't verified when ndigits = undefined, so the resulting number from toFixed() had no decimal part, and the regular expression cut all the zeros in the integer part.