Fix bug 605: ambiguous call to std::min when calling .diagonal() on a sparse matrix with non default index type