Inferring ancient population history in Africa using modern sequence data