Should it be extern(Windows), perchance?.. (I haven't D on Windows for ages).
The stdcall calling convention? I think that would only matter for the function, and indeed, trying that breaks the function being able to link** (and the variable remains broken)
** in 32-bit mscoff mode - no effect on 64-bit (where I think stdcall isn't applicable)