Congress averts shutdown, sends stopgap to Obama