Symmetry-preserving discretization of the incompressible Navier-Stokes equations