Fixes for SMP disabled and old g++ verions