Fixes for mac build.