Energy conservation for the Euler equations with boundaries