convert to NAN for Node 0.8->0.11+ compatibility