Uniqueness of the generators of the 2D Euler and Navier-Stokes flows