Patched fix from tosher

Line 116 failed when trying to use a private wiki; see tosher/Mediawiker/issues/10 (https://github.com/tosher/Mediawiker/issues/10)