Fixed static build; fixed #123