add support for 32 bit architecture

fix incorrect typecast in 32 bit systems
(uint64_t) ((data + len) - p));
(uintptr_t) ((data + len) - p));

make content_length into its own type to support 32 and 64 bit architecture
compile and test with CFLAGS += -m32
It was only a demonstration of how to compile/test for 32bit