Fix missing math library linking.
Fix warnings.