fix up some compat errors with <2.6.5