Fix yangtools and controller builds

- yangtools has several build issues along with controller, this patch
fixes them while they are upstreamed

Signed-off-by: Giovanni Meo <gmeo@cisco.com>