Fixing math library linking for certain platforms.