support out-of-tree building (bb#430)