Fix getmetadata standalone

The extract of print_* metadata functions broke the compilation of
this standalone. Fix it.