Fixed problem with static build