Add a dependency on the PyYAML Python module

This fixes #2682.