Move project definitions to CMakeLists's top

Fixes uninitialised variables in the ExplicitCompilerFlags part, namely CMAKE_COMPILER_IS_GNUCXX