Use nan to make module compatible with node v0.11.x