Fix CMake for older 2.8 versions