Fixed compilation issues with --enable-testing