Philippines terminates key military pact with US