Experimental test of a two-dimensional approximation for dielectric microcavities