changes for node 0.8 support