Update dependencies.

This PR supersedes #1823.