Tweaked C++ headers and structs for MSVC support