diff --git a/Users/cyberpank/tmp/navbar/navbar.install b/navbar.install
index f18e48e..e167267 100644
--- a/Users/cyberpank/tmp/navbar/navbar.install
+++ b/navbar.install
@@ -57,16 +57,14 @@ function navbar_requirements($phase) {
         'severity' => REQUIREMENT_ERROR,
       )
     );
-    if (function_exists('libraries_get_path')) {
+    if (function_exists('libraries_detect')) {
       // Check for Underscore.
-      $path = libraries_get_path('underscore');
-      if (!empty($path) && file_exists($path . '/underscore.js')) {
+      if (($library = libraries_detect('underscore')) && !empty($library['installed'])) {
         $requirements['navbar_underscore']['value'] = t('The Underscore library is present');
         $requirements['navbar_underscore']['severity'] = REQUIREMENT_OK;
       }
-    // Check for Backbone.
-      $path = libraries_get_path('backbone');
-      if (!empty($path) && file_exists($path . '/backbone.js')) {
+      if (($library = libraries_detect('backbone')) && !empty($library['installed'])) {
+      // Check for Backbone.
         $requirements['navbar_backbone']['value'] = t('The Backbone library is present');
         $requirements['navbar_backbone']['severity'] = REQUIREMENT_OK;
       }
