Update to new libstd api