Redefining the variable should work for d3d_antialias. Have you tried

var d3d_antialias = 4;

outside a function?