CMake: add MacOSX support