Short-run pain, long-run gain: the conditional welfare gains from international financial integration