Pakistan needs at least $ 4bn to avoid defaulting on its foreign debts , as key allies including the United States , China and Saudi Arabia have all rebuffed government appeals for immediate funding .