fix itoa's working range & interface

The original version did not consider the case of integers larger than
65535, but our width of an integer is 32 bits.