Befriend private classes in VSP_DECLARE_PRIVATE.
Fix GuiDeviceQt crashes related to invalid type casts.