According to Google/SO curl can indeed be built/configured to use the Windows cert store, seems that would be a better fix?
let a = function bar() { };
function foo( a ) {
a = 2;
}
foo( a );
console.log( a ); // bar