Lawmakers reach deal to fund military in 2014