Add HTTPBasicAuthFunc for custom credentials.

As requested by Rod McElrath on the mailing list.