xhprof: Execute aclocal and autoconf only if Gentoo is used.

`autoconf` fails on travis and probably other systems, too. See #6311.
We should call `aclocal` and `autoconf` only if Gentoo is used.