Fix compilation on gcc 4.7
Fix unit test compilation