Add some casting and namespace specifiers to keep MSVC happy