Fix a few build issues on MacOS

The changes in modules/test/benchmark/src/priority.cpp are OSX specific, but I'm less sure about the CMake one.