Ultra-wideband (UWB) indoor positioning systems have the potential to achieve decimeter-level accuracy. However, the performance can degrade significantly under Non-Line-of-Sight (NLoS) conditions. Detection and mitigation of NLoS conditions is a complex problem, and has been the subject of many works over the past decades. When localizing pedestrians, human body shadowing (HBS) is an important cause of NLoS. In this paper, we propose an HBS mitigation strategy based on the orientation of the body and tag relative to the UWB anchors by attaching an inertial measurement unit to the UWB tag. Two algorithms are designed and implemented, of which the second algorithm is designed for robustness against errors in the IMU's estimated heading. The proposed algorithms are validated by UWB Two Way Ranging (TWR) measurements, performed in two environments. Two more algorithms are implemented as a benchmark, of which one is based on the estimated first path power, and the other is based on range residuals. The proposed algorithm outperforms the other algorithms in the higher error statistics, achieving a 49% reduction of the p90 error depending on the environment.