use mpz_import instead of mpz_limbs_{write,finish} for GMP5 compatibility