The natural boundary conditions as a variational basis for finite element methods