Global imbalances and gross capital flows