Changing the line that calls libgmp like this ( Int is replaced with Int32 )
return convert(Int,ccall((:__gmpz_jacobi, :libgmp), Int32,
gives correct results. The C header and code says the return type is 'int'.
All values that should be -1, come out 4294967295. This may be system
dependent, but I only have one laptop available at the moment.