Microdosimetric measurements in the build-up region of very pure high-energy photon and electron beams