I suppose if would depend on whether you believe that inaction leading to more death is more ethical then actively choosing to murder one life to save the other.
Let's look at the same problem but swap out the actors. Say you have one man with a mortal wound to his heart, and another man with a mortal wound to his lungs. Both will probably die, both men have families, and neither wants to die. Is it ethical to murder one man without his consent and harvest the deceased's organs to save the other?
That's a bad analogy. Let's change it: the man with a mortal lung wound could use the lungs from the man with the mortal heart wound, but the reverse is not true for some reason involving tissue compatibility. So if nothing is done, both men die. If the heart man is killed and his lungs harvested, the lung man will live. If the lung man is killed, both men die. So either both men die, or the lung man lives. On top of all of this, the heart man is braindead, so he has no opinion and no ability to make a decision, and no real chance at a future anyway.
I'd say it's perfectly ethical to kill the man with the mortal heart wound and take his lungs.
There are lots of ethical frameworks where it is better to both die than murder the child.
That said, the situation posed by the OP was the the mother may die (e.g. there are risks).
What percent shared risk of death do you think would justify strangling a 2 year old child?
personally, Im pretty middle of the road on abortion and can understand where each side is coming from.