Fix compile errors on TH < 7.4 (really now)