UN secretary general Antonio Guterres has congratulated President Ashraf Ghani on winning his second term in office and wished for lasting peace in the war-torn country.