add a test with gmp and PHP_INT_MAX
fix datatypes for gmp to be compatible with GMP/MPIR on different platforms