Fix unit tests on gcc