Are you using Apache available OOTB? I had a similar issue when trying to use XAMPP, MAMPP. The .so file is compiled against a different lib and therefore creates an issue. Instead, I used Mac installed Apache available under /etc/apache2 which fixed the issue.Here is the article I used as reference...