cpp: replace usage of removed MetadataTools methods

This fixes compile errors introduced by 6b31a4ff9ac4bfc1ccf356804add10dc637366f5
Merge pull request #525 from melissalinkert/cpp-compile-fix

cpp: replace usage of removed MetadataTools methods