Add support for out-of-tree builds, per Issue #12. Thanks to @andy-js