Limits on the cosmic-ray ionization rate toward massive young stars