build fixes for building with a source-separate build dir