On the cavity size distribution in water and n-hexane