fix a 5.x'ism that 4.x needs protection from. make this code compile standalone.
Submitted by: ru
Pointed out by: scottl