Fix outsource build and make distcheck