fix TypeError on node < 0.10