Gravar-mail: Ancestral haplotype reconstruction in endogamous populations using identity-by-descent