Change the build system to make math functions work

This build system is based on https://github.com/eehusky/Stellaris-GCC
temp