fix for select system call problem on windows reported by @nicholasamorim