make country code lowercase to match perl implementation