Phylogenomic evidence of adaptive evolution in the ancestry of humans