Spain to convert part of Algeria's debt to investment