Fix for compatibility with LLVM trunk changes using unique_ptr.
Also avoid gratuitous copy of EngineBuilder object.