HCN observations of comets C/2013 R1 (Lovejoy) and C/2014 Q2 (Lovejoy)