Localize some FFI functions