cast malloc to make MSVC happy