necessary changes to compile on gentoo