Updated support for gmpy and gmpy2.