gcc50: Change c++ locale handling