fix 64-bit issues and use #ifdef MMAP_HW instead of #ifdef ZYNQ