Move function to work on systems without HWLOC