James Anderson revealed team-mate Joe Root was "puking up throughout the game" as England secured a remarkable 74-run victory over Pakistan in the final session of day five of the first Test in Rawalpindi.