compile fixes on Gentoo