Check for string COW by checking for library, not compiler

Note in particular that clang++ uses libstdc++ (GNU) by default, and not libc++.
Therefore, it suffers from the string COW bug too.