How to define thermodynamic systems and boundary conditions using either intensive or extensive variables