Spain, Morocco sign deal to regulate immigration