Rates on 30-year mortgages hover near 4 percent