Fix setting of QT_API environment variable