Fix Makefile for running valgrind with old tests.

* `export USE_VALGRIND=1; make oldtest` cannot be run without this patch. 
* Also related: the Makefile uses `USE_VALGRIND`, but `.ci/gcc.sh` sets `export VALGRIND` which seems to only affct the new functional tests in `test/functional`. Is this intentional?