Fix for 64 bits linux

I replaced `unsigned long` with `unsigned int` but I would recommend using fixed size types everywhere (uint32_t, etc...)
Fix writing too...
Merge branch 'patch-1' of https://github.com/mickael9/gmad