West Ham striker Andy Carroll hit the crossbar five minutes from time before Sakho stole in at the far post to lift West Ham out of the relegation zone.