build: link test programs with static libraries