Current-account effects of a devaluation in an optimizing model with capital accumulation