Made c program library linkage static and added -lm to avoid
unreliable Linux shared libraries.