Distressed debt restructuring in the presence of credit default swaps