Add getopt into dist archive Fixes: #815 (cherry picked from commit c8b403a81bda3a9603ffda9c393a823719fda196)