Add -std=c++11 flag only if supported by compiler.