valgrind: fix Lion-only patch

Closes #29016.