fix link errors on gcc 2.6