Ensure that the MAX macro is always defined.

On some systems, none of the (directly or indirectly) included headers does
provide that macro. First reported in https://bugs.gentoo.org/460524