Set CMAKE_CXX_FLAGS if they are set to default

On Windows CMake sets CMAKE_CXX_FLAGS not to an empty string by default. Test
for the string and assume we can set optimized flags in case. Thanks to Ky
Waegel for noticing.