Fix opening UFO fonts with bad openTypeOS2Type key

4 patches from Khaled for resolving https://github.com/fontforge/fontforge/issues/448