makedef fixes

As pointed out by Clément Bœsch.