Fix memset-related crashes caused by recent GCC's