Is cannibalism while stranded in life boat ok? No defense. It's murder
en.wikipedia.org
en.wikipedia.org
A defendant could also assert insanity or diminished mental capacity as defenses. Today necessity can be a defense to murder in some jurisdictions and some facts. So it is not precluded per se as this decision says. I have no idea whether international law could be controlling here or what that international law is.
Of course all of this is semi-moot because US criminal law is dominated by statute, not common law.