Fix unit test and compilation on Linux