The 2.1 code is the same, but I imagine if you just add

$html_output_mods_present = true;

after the snippet you have posted, it will override that check and continue on it's merry way none the wiser.