Map getopt to bsd_getopt if we are using the overlay This will ensure the code can safely and correctly use optreset transparently.