fix travis build -- generalize blas_set_num_threads and check_blas functions