Removed use of deprecated features.

Instead of using std::{unary, binary}_function, we now specialize
std::hash.