Pelosi pledges to avert shutdown in US as Republicans oppose