fixed for NodeJS v0.8.X and v0.10.X