Fix to compile on R17 with nowarn_deprecated_type