Fix out-of-source builds where make test fails