Panama was not a US territory but anyone born to American citizen parents, even on Mars, is a natural born citizen.
Nor was the canal zone US territory.