Fix out of tree build issues with apidefs.h