Tata Motors swung to a quarterly profit on strong sales at Jaguar.