setting nw window id when new window is created

For rogerwang/node-webkit#1519