Fix building the portable lib