Fix regression tests with out-of-tree builds.