ISO-SWS spectroscopy of gas-phase C2H2 and HCN toward massive YSOs