Collectivity of neutron-rich magnesium isotopes investigated by projected shell model calculations