Add check for OPTIMIZED_SALSA flag