Fixes for building packages on Darwin