You need to change the makefile for sgi64 | nthread_sgi64 as follows:
Change from:
CC="cc -64 -mips4";; \
Change to:
CC="cc -64 -mips4 -DSYB_LP64 ";; \