Compilation fix for wxWidgets 2.8.

Fixes #513.