Add support for YAML-CPP 0.5+.

The new yaml-cpp API removes the "node >> outputvar;" operator, and
it has a new way of loading documents. There's no version hint in the
library's headers, so I'm getting the version number from pkg-config.

This patch is a port of the ones created by @ktossell for map_server
and other packages.