Remove use of deprecated constants.

Fixes #2232