UK food prices climbed in May as the weak pound pushed up the cost of imports, new figures show.