More reliable valgrind detection.