Spain, US sign permanent anti-terrorism pact