Fix unit tests to compile with stricter warning levels.