Workarounds for a couple of MSVC quirks.