Obama condemns extremists' exploitation of religion