Implement __hash__.