Fix bitrot and make it build again with newer toolchain