Add support for fetch_connect callbacks to libfetch

(Credit to marinosi)