Optimization of the nonlinear parameters of the correlated Gaussian basis functions with imaginary-time propagation