Small tweaks to support gentoo