Investigation on defects in Mg and Al alloys under dynamic loading by the small-angle scattering method