Fix build errors caused by changes in rust nightly.