Add Windows fixes and fix dependencies on blas and lapack.