Add typemap argument to the code generator

This may allow one to easily generate code for different String backends
such as Text or ByteString.