Added malloc.h to metadata.h

There are places within the mongo headers that malloc is needed, and this is preventing compilation on Fedora.