nios2: fix syscall restart checks