Add a network timeout to the mongo connection. Fix #627