Switched from legacy C types to C++11 portable ones

 - "unsigned long" became "uint32_t"