Phase transitions in freeze-dried systems - quantification using in situ synchrotron X-ray diffractometry