contrib: tweaked a few lines to make 64bit compilation possible on Macs