fix for missing read() on windows