Previously, aggressive loop optimizations with a new compiler were not
possible due to undefined behaviour at end of arrays.
A macro "UBFIX" is added to allow ifdefs for fixes which resolve
undefined behavior. For example newer GCC versions will detect various
bugs in the original game code and will otherwise not compile with -Werror.