Globular clusters and the Mira period–luminosity relation