PR libstdc++/57060 cope with invalid thread IDs