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

...ry_function.

Fixes #414