#9 port to Node 0.11 and 0.12 by using nan