Andy Murray fought back from a set down to defeat Tomas Berdych at the Barclays ATP World Tour Finals in London.