ARM semihosting: fix EOF handling with SYS_READ