Fix make check for out-of-tree builds.