Silence a warning from gcc 4.9.1.

The warning pertained to the fact that we define a function in an anonymous
namespace that is only called from a function inside an #ifdef ... #endif
block. The solution is to move the function into #ifdef ... #endif as well.

This addresses this test result: http://cdash.kyomu.43-1.org/viewBuildError.php?type=1&buildid=11683