[server][testDBTermCodec] Fix the crash on i386 and with C++11 features.

This fix for the problem reported in #216.

Without an explict cast, the number is stacked as 64bit. However,
the code that gets out assumes that the type of the stacked argument
is gint because the type is specified as G_TYPE_INT.