Added a CMake file and fixed Linux build