mw.Title.js: substr() with negative value not working in IE

Change-Id: I78a9f55ffb8e1d421ee81a101ed18c626f679210