this work with both the in-tree and a newer version of yaml-cpp. Requested by jasper@, same diff from kirby@. ok jasper@