Now with some conditional compilations to support gcc 4.6 and 32 bit vintage machines