Gravitational microlensing by low-mass objects in the globular cluster M22