In Chile and Peru, pope urges unity, compassion