It might be possible to do this with a script but it wouldn't be practible in use, because you need to restart messenger each time you add or remove that button anyways.
So doing this with a script would be almost useless...
Do as markee suggested and ask the developpers of
A-Patch and/or
MessPatch to add it in their patches.