Builder scripts receives shared_ptr, fix export_class to export templates