Wages rose at an annual pace of 3.1% in the three months to August, official figures show.