Don't hardcode references to libstcd++

In the past we wrongly used the C linker so we ended up with these
libraries explicitly linked. We now properly link C++ code with CXX.
This means we don't need to explicitly link the C++ standard library.

This also fixes issues with FreeBSD which has switch to clang / libc++
as the default instead of libstdc++.

Also see #2900