fix to work under node 0.10+