Automatically use curl adapter when installed

Curl adapter is, according to yourself on some issues, faster and more reliable and should be used if possible. This patch allows to automatically detect the presence of curl module and use the curl adapter if the curl module is present.