Fix deprecated use of has_extension

When calling this function in the 3.0 fashion the extension name ends up being the class name due to a misnamed variable.