Fix problems when using libstdc++