add GTK3 support and workaround for old Cairo-based crashes