Mid-UV studies of the transitional millisecond pulsars XSS J12270-4859 and PSR J1023+0038 during their radio pulsar states