Build fixes

small bug fixes spotted by new Fedora autotools.