Joe Denly made a career-best 87 runs to lead England to a first-innings score of 258 in their first One Day International against South Africa.