[cs] Fixing compile errors for -D erase_generics