fix build errors for node 0.10 and node 0.11