add compatibility to Node.js 0.10.x

Maybe we can drop 0.8.x support.