Ultrasonic study of thermal elasticity in granular RBCO (R = Y, Gd) compound