Credits to Giperion and Crito.
Fixed compile for ad, vmapextractor, vmap_assembler, mmap. Restructured library usage of libmpq and loadlib.