U.S. President Barack Obama vowed to work with Libya to bring to justice attackers who killed the U.S. ambassador and other diplomats but said the killings would not hurt U.S.-Libyan ties.