Fix OrderedHashSerializer on 1.8.7 to work with optional adapter_metadata.