gmp: Fix compatibility with older libgmp releases