Changes to make native builds more reliable, and to prevent in-tree builds.