GvNAME_get is not defined on 5.8

On more recent perls it's #defined as GvNAME, so use that instead.
On 5.8, PERL_UNUSED_VAR cannot take a const variable

because it's actually defined as 'if (0) var = var'. So
drop the const to make it compile.