build: correctly link math library (fix build on Ubuntu)