House approves stopgap spending bill hours before shutdown deadline