count number of buffer bytes copied manually
Merge pull request #1 from leetreveil/copy

browserify fix