More fixes for building on the mac