fix deprecated usage

This gave a deprecation warning when building master a few minutes ago.