riscv64: fix linking with binutils 2.40