Allow disabling of installing extensions in lib/

Fixes #749