fix #7082, and workaround for windows "feature" #7174

@Keno can you test this? (it's configured on the julia windows test machine now) it still seemed to be blocking waiting for another character, so maybe the jl_ispty call was not the only call stopped by ReadFile? perhaps `stty` also?