Fix variable name and use isset() to shut up a stupid notice
We've had to reapply this small core hack on ShoutWiki basically after
each core upgrade since MW 1.23 (at least).
ShoutWiki SVN r2565, r2819
Change-Id: I815efe0a3c66b145a2c429549cf139ed3c67d175
(cherry picked from commit 01504ab3417fb05806892ac50748bd623868d1ee)