Mooen Ali's quick-fire 39 from just 11 balls proved crucial in England's two run win over South Africa in Friday's second T20 international.