Fix flags for linking.