Only add libraries to YAMLCPP_LIBRARIES if they are found.

Should fix error when only one of them is found.