The ONS said borrowing rose to £17.7 billion last month, the second highest figure on record for May.