Fix build errors with CMake 2.8