license: Added licenses to legal/licenses, swapped out getopt_long()

Windows builds require a getopt_long() implementations, and the
implementation had been the (undesirable) BSD 4-clause. This has been
replaced with a BSD 2-clause licensed implementation.