impl sendfile for linux and mingw