Corrected link errors caused by -bf-thread-safe

Chris Daley noticed that the conversion from C++ function names to C
function names in dcaa4cdb2e65e9b00d61f49893517270a92d5c27 overlooked
the `bf_acquire_mega_lock()` and `bf_release_mega_lock()` functions
defined in threading.cpp.  As a result, these functions were being
defined with C++ naming conventions but referred to with C naming
conventions.  The fix was simply to define those functions with
`extern "C"`.

This commit closes #7.