Patched to compile on Windows.
Patched to compile on non-C99 Microsoft compiler.
Backed out hg changeset b92b8c52946c. REFGUID is apparently a const type.