riscv/linux: Don't add -latomic with -pthread