[mach-o] avoid overly clever std::find_if

The bots were complaining (possibly because of a lack of traits on the iterator
I was trying to use). No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@219843 91177308-0d34-0410-b5e6-96231b3b80d8