build: fix build error for node 0.8 and 0.6