Added valgrind changes from gentoo