misc fixes for building on centos