Mining companies have been struggling with a protracted slump in commodity prices, coupled with a slowdown in China's economy.