No need to hack anything. They can be "wrapped" inside loader that adds them to dos.library resident command list. If they are not pure, they need slightly more complex loader. They can be even compressed and unpacked on demand if rom space is limited.
I'll have some code somewhere (used in aca500 flash resident commands) that should do what you want.