Fixes Issue 11123 - std.getopt should support function callbacks.