A model of international financial crises