Configure extensions only after installing php-cli

Fixes #18.