Attenuating international financial shocks: the role of capital controls