Fix running under gentoo & funtoo