Various fixes for an Ubuntu build

These are various fixes for a functional Ubuntu build.