The USA has the death penalty for children, so lets jump off the high horse on that one.
Mustafa al-Darwish also was older than 18 for part of it (And one assumes the terrorism charge would have been later in the timeline) which fits with SA saying they no long execute children, which would make them better than the USA on that issue.