surround valgrind specific code with #ifndef NVALGRIND