Shape Dependence of the Thermodynamic Properties of Magnetic Systems