Niall McGinn's second-half free-kick gave Aberdeen a 2-2 draw with Dundee United in Wednesday's SPL clash at Pittodrie.