Avoid inheriting function objects from std::unary_function and std::binary_function.

Fixes #414