fix hash() for larger integer types. fixes #3273