Get rid of depreciation warning.

API isn't stable anyway.