US House passes $840B defense spending bill