Manila is shoring up military partnerships with other nations as it seeks to counter Beijing in a South China Sea dispute.