Fix DeployExtension condition. Fix SetEnvironmentVariable target under .NET 4.5.1.