Fix problem with -static