Refactored the build system to allow statically linking with the C and C++ runtimes with gcc