Thermodynamics of d-dimensional hard sphere fluids confined to micropores