Fixed compatibility issues with Node.js v0.8.x