For those that do not speak D, "version", is a compile-time 'if', exactly like #ifdef, for different builds or different conditions/ options. So too is "static if", it is just the same as a #if, it runs at compile time only and can access all D variables, as in D there is no separation into two languages that you get in C with #define variables in the preprocessor language only and on the other side there are C native variables that the preprocessor itself does not grok at all.
So there is nothing at all wrong with that static if, that is exactly what it is for. But in any case, someone shipped a screwed up set of files, with a compiler plus D header files that do not match, or else if I am wrong header files that do not compile anyway.