Convert a dict to a protobuf message