Libya strikes deal to end sanctions