Use separate environment variables for "shared" and "static" Qt libraries.