[OSX] Fix Window.focus() not taking focus

FIX rogerwang/node-webkit#2724 and also rogerwang/node-webkit#2735
Merge pull request #2779 from mrfabbri/fix-2724

[OSX] Fix Window.focus() not taking focus