4,000 firefighters try to beat back flames as Yosemite fire grows