PHP uses libcurl which uses the SSL library. You don't need to rebuild PHP but you need to provide a separate libcurl that is built to use the SSL library of your choice.
Alas, you need to build libcurl to use OpenSSL or install a libcurl-OpenSSL and then have your PHP use that libcurl instead of the original one.