Measurement of 8Be fragments in the interaction of 12C with nuclei