SERVER-8786 Make sharding/authConnectionHook.js more stable