Link with libm to fix build on some platforms.  Fixes #29.