A variational calculation of weakly bound rotational-vibrational states of the mesic molecules ddμ and dtμ