changed $block->getExpiry() to be mExpiry instead.

getExpiry() method was added after MediaWiki 1.8 so this breaked the
compatiblity with 1.8.