Starting from Drupal 7.36, Drupal could not load jQuery to the page.
In both the cases, you can force Drupal to load jQuery.
$build['#attached']['js'] = array(
Notice that, normally, calling
drupal_add_js() or adding
$build['#attached']['js'] is sufficient for making Drupal load jQuery, but if another module set
FALSE, or if the settings.php file contains a
TRUE with one of the methods I described, you are sure the jQuery library is loaded from Drupal.