Add support for -static flag, initially on Windows