diff --git a/search_api_solr.module b/search_api_solr.module
index 3097d13..9ca9893 100644
--- a/search_api_solr.module
+++ b/search_api_solr.module
@@ -32,6 +32,9 @@ function _search_api_solr_solrphpclient_path() {
     }
     else {
       $search_dirs[] = 'sites/all/libraries/SolrPhpClient';
+      if (isset($GLOBALS['install_state'])) {
+        $search_dirs[] = 'profiles/' . $GLOBALS['install_state']['parameters']['profile'] . '/libraries/SolrPhpClient';
+      }
     }
     $search_dirs[] = drupal_get_path('module', 'search_api_solr') . '/SolrPhpClient';
     foreach ($search_dirs as $dir) {
