Fixes to make gcc happy (breaks MSVC...)