remove several unused variables. Fix variables initialised twice.
Disable static libraries build

Signed-off-by: Daniel P. Berrange <dan@berrange.com>