US, China military chiefs reach deal to reduce 'risk of miscalculation'