Fix petsc to build again on Linux
Python: make bzip2 and openssl deps optional

Only use them on linux. Update tests to include bzip2 and openssl explicitly.