fix link error with gcc