Fixed compilation error on 32bit systems

Credits to Maato.