Homotopy-continuation method for stability analysis in the global minimization of the Gibbs free energy