OK so this is a tough one.
Normally, we treat answers that look like they were stolen from other answers, but contain an explicit thank-you message at the end, as thank-you answers, not plagiarism. This is because the thank-you message serves as enough of an indication that the poster is disclaiming authorship of the content and hence not trying to pass it off as their own. Is explicit citation of the original comment still missing? Sure. (The answer clearly thanked the comment author by name though, which is as good as it gets.) But in my ongoing effort to be more welcoming to new contributors, I'm comfortable special-casing thank-you answers.
Now, we also understand that these can be really hard to spot and can look remarkably like stolen content at first glance. So, even if someone were to flag such an answer as plagiarism... I guess I wouldn't blame them? I mean, even we moderators fail to spot these things sometimes and mistakenly treat them as the serious offense that plagiarism otherwise is. And the consequences for our actions are far greater than those of yours, since your job is simply to flag issues for us to look into, and so you shouldn't be implicated in any way.
But this is a thank-you answer copying not from an existing answer, but a comment, because no answer exists. First off, generally, if someone is posting thanks as an answer, they probably don't (or don't know to) distinguish comments and answers. That's their prerogative, and for that reason alone I'm not about to treat this as plagiarism either.
So the question becomes how we the community should handle these types of cases. Usually if no answer exists except in the comments then the content is fair game. However it is considered good manners to make your answer — should you post one for the sake of completing the question — a community wiki to symbolize that you don't take personal credit for the solution. And also credit the author in case the original comment goes away, which again the poster did to begin with.
I spent 2 minutes thinking about it after opening this meta question and decided that the easiest way out is to flag the answer for moderator attention with a custom flag, state as much as you can glean about the answer, and let us figure out the best course of action. Only moderators can toggle wiki on other people's answers, so even if you could clean up the answer (which, mind you, is fine to do), that's only half the job done depending on who you ask. If nothing else, flagging makes us aware of the answer to begin with, even if only for the few minutes of attention it needs, and I think that is the most important.