skip empty buffers

This is a workaround for a #5715 in joyent/node
Merge pull request #244 from egirshov/issue-243

Fix #243: skip empty buffers