Obama signs bill to avert default, open government