Fix missing strdup in mingw on windows

Having the `-std=c++11` flag enabled breaks compiling protobuf on windows using mingw. It now correctly mirrors the logic in the if  unordered_set block below (lines 56-65).