[js] toString(): support tsn_itoa() with arbitraty radix