Make lapack dependency optional