refined default hash functions to support std::pair