First attempt to make it compatible with nodejs 0.11.x