Fixes for Gentoo