Sorry for the noise, #7302 didn't always work. Thanks to @luke-jr for working out the issue.
Due to include ordering, defining in one place was not enough to ensure correct usage. Use global defines so that we don't have to worry abou this ordering.
Also add a comment in configure about the test. @luke-jr can you please verify that this now works for you?