Senate passes stopgap funding bill, avoiding shutdown