Fixed compatibility issues with Node.js 0.8.x