Patch #5771 by Frederik Vestre: Fix BMP loader to work in 64bit environments (simulator).