Fix CMake files on centos 6

On Centos 6, the CMake files is broken. I have a fix and have tested on Centos 6.5.