diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,11 @@
 ## Changelog
+### 0.9.2
+
+- Add cabal flag 'export-dynamic': Default behavior is to include all symbols in
+  the dynamic symbol table, as this enables users to load dynamic lua libraries.
+  However, it is sometimes desirable to disable, e.g., when compiling a fully
+  static binary. See jgm/pandoc#3986.
+
 ### 0.9.1
 
 - Increase user-friendlyness of error messages: The error message returned by
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # hslua – Lua interpreter interface for Haskell
 
-[![Build Status]](https://travis-ci.org/osa1/hslua)
+[![Build Status]](https://travis-ci.org/hslua/hslua)
 [![AppVeyor Status]](https://ci.appveyor.com/project/tarleb/hslua-r2y18)
 [![Coverage Status]](https://coveralls.io/github/osa1/hslua?branch=master)
 [![Hackage]](https://hackage.haskell.org/package/hslua)
@@ -8,7 +8,7 @@
 Hslua provides bindings, wrappers, types, and helper functions to bridge haskell
 and lua.
 
-[Build Status]: https://travis-ci.org/osa1/hslua.svg?branch=master
+[Build Status]: https://travis-ci.org/hslua/hslua.svg?branch=master
 [AppVeyor Status]: https://ci.appveyor.com/api/projects/status/ldutrilgxhpcau94/branch/master?svg=true
 [Coverage Status]: https://coveralls.io/repos/osa1/hslua/badge.svg?branch=master&service=github
 [Hackage]: http://img.shields.io/hackage/v/hslua.svg
diff --git a/hslua.cabal b/hslua.cabal
--- a/hslua.cabal
+++ b/hslua.cabal
@@ -1,5 +1,5 @@
 name:                   hslua
-version:                0.9.1
+version:                0.9.2
 stability:              beta
 cabal-version:          >= 1.8
 license:                MIT
@@ -33,7 +33,7 @@
 
 source-repository head
   type:                 git
-  location:             https://github.com/osa1/hslua.git
+  location:             https://github.com/hslua/hslua.git
 
 flag system-lua
   description:          Use the system-wide Lua instead of the bundled copy.
@@ -53,6 +53,12 @@
                         with extreme care.
   default:              True
 
+flag export-dynamic
+  description:          Add all symbols to dynamic symbol table; disabling this
+                        will make it possible to create fully static binaries,
+                        but renders loading of dynamic C libraries impossible.
+  default:              True
+
 flag luajit
   description:          Link with LuaJIT.  This implies flag system-lua as well.
   default:              False
@@ -166,14 +172,16 @@
 
   if os(linux)
     cc-options:         "-DLUA_USE_LINUX"
-    ld-options:         "-Wl,-E"
+    if flag(export-dynamic)
+      ld-options:         "-Wl,-E"
 
   if os(darwin)
     cc-options:         "-DLUA_USE_MACOSX"
 
   if os(freebsd)
     cc-options:         "-DLUA_USE_POSIX"
-    ld-options:         "-Wl,-E"
+    if flag(export-dynamic)
+      ld-options:         "-Wl,-E"
 
   if flag(lua_32bits)
     cc-options:         "-DLUA_32BITS"
diff --git a/src/Foreign/Lua/FunctionCalling.hs b/src/Foreign/Lua/FunctionCalling.hs
--- a/src/Foreign/Lua/FunctionCalling.hs
+++ b/src/Foreign/Lua/FunctionCalling.hs
@@ -128,13 +128,11 @@
   callFunc' :: String -> Lua () -> NumArgs -> a
 
 instance (FromLuaStack a) => LuaCallFunc (Lua a) where
-  callFunc' fnName x nargs = do
+  callFunc' fnName pushArgs nargs = do
     getglobal' fnName
-    x
-    z <- pcall nargs 1 Nothing
-    if z == OK
-      then peek (-1) <* pop 1
-      else throwTopMessageAsError
+    pushArgs
+    call nargs 1
+    peek (-1) <* pop 1
 
 instance (ToLuaStack a, LuaCallFunc b) => LuaCallFunc (a -> b) where
   callFunc' fnName pushArgs nargs x =
