hwloc: fix compilation when configure'd with --without-hwloc

This commit fixes a misplaced #endif from open-mpi/ompi-release@1bbb7f6890197284df87a0200b6297515062d1be
and is a one off commit (e.g. master is ok)