Changed #defines to global booleans so that the workaround behavior can be customized at run time.