Automatically support clang with libstdc++ when standalone.
Fix unsigned int overflow reported by clang's integer sanitizer.