Improve compatibility with CMake 2.6