fix function calls so pthreaded code compiles on AMOS