fix building on ubuntu

There are two issues that have broken the build on ubuntu. These two commits address those issues.