HCN Observations of Dense Star-forming Gas in High-Redshift Galaxies