CMake compilation ok on OSX & Linux