Allow passing optional kwargs to _dump to be passed to the yaml.dump