fix for wxWidgets 2.9.5 API change, fix for treeCtrl crash (use of intptr_t where ptrs are stored in int)