quit handling for node webkit