fix string concatenation

set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11") which leads to list of strings.
The result is "-stdlib=libc++;-std=c++11"  if CMAKE_CXX_FLAGS is defined as "-stdlib=libc++"
Merge pull request #5374 from justmao945/develop

Correcting the definition of CMake variables.