N = 4 near-horizon geometries in D = 11 supergravity