Make blas detection more robust