basic fixups (for Gentoo)

Trying to compile this on Gentoo.