Fix gmp_strval base issue

We were using the supplied input base value meant for output on the input, causing bad mojo.  This fixes it to only use the base for creating the output string.

Fixes #3793