build: only require scanner when building libraries
There's no point in searching for a scanner (and failing if it's not found) if we aren't building the libraries.
This enables building only the documentation without the scanner.
Signed-off-by: Simon Ser contact@emersion.fr