Add non-unix support by removing hacked-together non-blocking IO. New method now relies on threading.