Add build script
Fix compile problem: define `gen-fwrapper-thunk` at compile time

which is used in macro `define-fwrapper`.
Fix typo in docstring