The program could also be compiled to search libpixbufloader-xpm.so in rgbpaint directory maybe? Instead of the default path... if I'm not wrong baf did something like that for eboard app:
http://www.fabiszewski.net/kindle-chess/
He placed
libpixbufloader-xpm.so and
gdk-pixbuf.loaders in the pixbuf directory of the app and linked them from here