More fixing for other compilers

Replaced std::any_of with boost::algorithm::any_of, and copy_if by
remove_copy_if with inverse predicate.