Fix compilation error on GCC 4.6+

The `-combine` flag was removed in GCC 4.6 so compilation currently fails. After these changes, compilation completes successfully and the math demo works.