The HDD enclosure had a USB 3.0 port which happens to be of a similar size to an RJ45 network connection. I decided to make use of that by relocating the USB 3.0 port internally, since only the XU4 needs to connect to that. The RJ45 connection then went into the empty space I had left.
To make the RJ45 port sit properly, I cut out a piece of acrylic and slipped the port into it. The port had locking grooves on it so it sat snugly.
I used a short network cable that was stripped down and connected to the port's terminals. This was a bit of a tedious task because these cables are not designed to be taken apart. Each of the wires had to be doubled back over and soldered to be thick enough to fit into the terminal jaws.
Some PCB mounting spacers were then added on the front and back. The ones on the back are really there just to hold the nylon spacers in place, I could have used screws too.
Then it was a matter of making some extra holes in the HDD enclosure for two screws and screwing the whole thing into place.
The network cable looped around to the XU4 network port and I was done.