fix compilation errors with nodejs 0.10.x