getMetadataByName function uses plain C strings in version < 3.1