only include DB_THREAD flag when using threads