Rewrote Wad_CheckLump to be more portable

Now works full on MinGW-w64 and w32! Special thanks to Quasar