You'll recall that U.S. spies were convicted of treason during the Cold War, despite the absence of a formal declaration of war against the Soviets...
I may be wrong about this, but I believe these spies are generally not formally charged with treason (probably for the reason I stated). Julius and Ethel Rosenberg, for example, were convicted of espionage and conspiracy to commit espionage, not treason. And Jonathan Pollard is rotting away in a Federal prison right now following his convictions on espionage charges, not treason.