Add some custom math defines for portability