build: Link with the math library.

Needs the math library to support the pow() function.
code: Fix some warnings at compile-time.