setup.py: use __import__ to check if dependencies are installed

Signed-off-by: Jerome Flesch <jflesch@gmail.com>