An agent-based approach to modelling long-term systemic risk in networks of interacting banks