Fix for 0.8

Version 0.7 only used get_metadata_field_value() to to call private method, and always expected an array. This change improves compatibility with 0.8+, where a string could occur.