Fix for 64 bits linux

I replaced `unsigned long` with `unsigned int` but I would recommend using fixed size types everywhere (uint32_t, etc...)