The macrodynamics of external overborrowing and systemic instability in a small open economy