Philippines ends security pact with US