Updated for node v0.8.x