Use inputhook_wx2 on osx

Fixes #2762
Merge pull request #2901 from lessandro/osx_inputhook_wx

Fix inputhook_wx on osx