Make POSIXTerminal run on Windows

There is probably more to it, but with this change the NullPointer Exception in the read loop disappears