Add define guards around otherwise unused variable.