wrlib: re-introduce the optimize_for_speed flag for binary compatibility