fix out-of-directory builds