fix problem for NO_LAPACK option

fix problem for NO_LAPACK option