package freeimage: fix static build and add test program