brute force compatibility with older Luatex

import old fontloader code -- neatly packaged and isolated