Added basic cmake build structure and minor modifications to compile on linux