Solvent induced structural variation in magnesium carboxylate frameworks