fixed cmake compile error when compiling on Xeon Phi
making CMakeLists.txt more system independent