Cast calloc() calls to satisfy C++ compatibility