Use drupal_is_cli instead of php_sapi_name.

Fixes #11