opt_quat with and without lapack