Miscelaneous improvements

Fixes a number of compiler errors and warnings.
Fixes a problem with the toolbar "grabber" not showing on mac (wxWidgets 2.9.4).