Possible fixes for building on Mac