Strip the flags only if they exist

Correct bug that prevent building with old compilers that do not support c++11