FreeBSD compatibility
diff --git a/BUILD b/BUILD
index 3879329..0b5bb6a 100644
--- a/BUILD
+++ b/BUILD
@@ -27,7 +27,7 @@
 # Android builds do not need to link in a separate pthread library.
 LINK_OPTS = select({
     ":android": [],
-    "//conditions:default": ["-lpthread"],
+    "//conditions:default": ["-lpthread", "-lm"],
 })
 
 load(