Mark compatibility shims as deprecated.

Fixes #2845