Fixes for Mac support on master branch.