do correct environment substitution on library paths on windows