UnusedLocalVariable fix for compact handling in Symfony2

This is a fix for my issue: https://github.com/phpmd/phpmd/issues/60

Here is a little bug. In Symfony 2.1 $func->getImage() returns a string like "Acme/SomethingBundle/compact"

So current code can't handle it. Because this string is not equals to 'compact'.