Remove const from pointer, since it causes problems with functions. Add  __hxcpp_set_finalizer.