Add a define to enable averaging