py: Make long ints hashable.

Addresses issue #765.