Searching for intermediate-mass black holes in globular clusters with gravitational microlensing