[lld] Allow flags other than -std= in CMAKE_CXX_FLAGS. Also simplify the IF conditions.