Running "make install" before "make check" does not fully work around this issue, because we don't install libdb2, but do build a shared libdb2 and test it via a shell script (plugins/kdb/db2/libdb2/test/run.test).