Stabilization of feedback-induced instabilities in semiconductor lasers