Fixed build for linux/mac with CMake.