Aberdeen centre-back Gavin Molloy has been sidelined for three months with a shoulder injury which required surgery.