On polyhedral products and spaces of commuting elements in lie groups