fix bad yaml-cpp usage in certain conditions
fixes #24