Theoretical calculations on the linewidths of rovibrational levels of the 3d Rydberg states of BeH and BeD