US, Japan pledge to deter Chinese actions if necessary