Don't use typed less<T> in the implementation of binary search algorithms.

Fixes #417