make compatible with node 0.8.x