fix missing typeinfo on Mac OS; remove abstractpainter.cpp