src: fix compile errors with nan 1.1.x